﻿namespace Entity;

/// <summary>
/// 资金记录
/// </summary>
public class MoneyLog : BaseEntity
{

    /// <summary>
    /// 用户编号
    /// </summary>
    public int UID { get; set; }


    /// <summary>
    /// 变更前余额
    /// </summary>
    public decimal Befor { get; set; }

    /// <summary>
    /// 变更后余额
    /// </summary>
    public decimal After { get; set; }

    /// <summary>
    /// 变更金额
    /// </summary>
    public decimal Money { get; set; }

    /// <summary>
    /// 0支出 1收入
    /// </summary>
    public int ChangeType { get; set; }

    /// <summary>
    /// 资金去向/来源类型
    /// </summary>
    public MoneyType MoneyType { get; set; }

    /// <summary>
    /// 订单号
    /// </summary>
    public int? OrderId { get; set; }
}


/// <summary>
/// 代理商金额日志
/// </summary>
public class ProxyMoneyLog : MoneyLog
{

}

/// <summary>
/// 客户金额日志
/// </summary>
public class ClientMoneyLog : MoneyLog
{

}

/// <summary>
/// 创客金额日志
/// </summary>
public class SaleMoneyLog : MoneyLog
{

}




/// <summary>
/// 商户金额日志
/// </summary>
public class StoreMoneyLog : MoneyLog
{

}

/// <summary>
/// 资金来源去向类型
/// </summary>
public enum MoneyType
{
    /// <summary>
    /// 
    /// </summary>
    排队收益 = 10,

    /// <summary>
    /// 
    /// </summary>
    排队佣金 = 11,

    /// <summary>
    /// 
    /// </summary>
    拼团返佣 = 20,

    /// <summary>
    /// 
    /// </summary>
    拼团失败红包 = 21,

    /// <summary>
    /// 
    /// </summary>
    订单退款 = 30,

    /// <summary>
    /// 
    /// </summary>
    提现 = 40,

    /// <summary>
    /// 
    /// </summary>
    提现驳回 = 41,
}
